<div class="tree-directory" (click)="showRight = false">
    <div class="tree">
        <ng-template #treeLeft let-nodes="$treeData" let-level="$levelIn">
            <ng-container *ngFor="let node of nodes">
                <div class="row" (contextmenu)="onRightClick(node,$event)" [ngClass]="{'isSelected': node.isSelected}"
                    [ngStyle]="{'padding-left':15+10*level + 'px'}">
                    <ng-container *ngIf="!zzNodeTpl">
                        <div class="pre-icon" (click)="node.isExpanded = !node.isExpanded">
                            <!-- 单选框 -->
                            <!-- <label (click)="isChecked(node)" nz-checkbox [(ngModel)]="node.isChecked"></label> -->
                            <!-- <i class="anticon anticon-folder"></i> -->
                            <i nz-icon [type]="node.isExpanded ? 'caret-down' : 'caret-right'"></i>
                        </div>
                        <div class="tree-name" (click)="node.isExpanded = !node.isExpanded;">
                            <span class="name"><span>{{node.name}}</span></span>
                        </div>
                    </ng-container>
                    <ng-template [ngTemplateOutlet]="zzNodeTpl" [ngTemplateOutletContext]="{ $implicit: node }">
                    </ng-template>
                </div>
                <ng-container *ngIf="node.isExpanded && node.children != null && node.children.length > 0">
                    <ng-container *ngTemplateOutlet="treeLeft; context:{ $treeData: node.children, $levelIn: level+1 }">
                    </ng-container>
                </ng-container>
            </ng-container>
        </ng-template>
        <ng-container *ngTemplateOutlet="treeLeft; context:{ $treeData: departTree, $levelIn: 0}"></ng-container>
    </div>
    <div class="rigthMenu" [ngStyle]="rightMenuStyle" *ngIf="showRight">
        <ng-template [ngTemplateOutlet]="zzContextMenuTpl" [ngTemplateOutletContext]="{ $implicit: currentItem }">
        </ng-template>
    </div>


</div>
<!-- 
<nz-modal [(nzVisible)]="createView" nzTitle="创建目录" (nzOnCancel)="createView = false" (nzOnOk)="cretaeSubmit()">
    <div class="createContent">
        <input nz-input placeholder="请输入文件夹名称" [(ngModel)]="createFromName">
    </div>
</nz-modal> -->

<!-- <nz-modal [(nzVisible)]="updateView" nzTitle="修改目录" (nzOnCancel)="updateView = false" (nzOnOk)="updateSubmit()">
    <div class="createContent">
        <input nz-input placeholder="请输入文件夹名称" [(ngModel)]="updateFromName">
    </div>
</nz-modal> -->